
package view;

import java.awt.Color;

import javax.swing.JPanel;
import javax.swing.JTextField;

import model.ACDirector;

import javax.swing.JLabel;

import controller.ACSystem;

import javax.swing.border.LineBorder;

/**
 * The ACDirector Pane 
 * @author Bob Landowski
 */
public class ACDirectorPane extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** The text field */
	@SuppressWarnings("unused")
	private JTextField textField;
	
	/** The ACDirector */
	@SuppressWarnings("unused")
	private ACDirector my_ACDirector;
	
	/** The first name */
	private String my_first_name;
	
	/** The last name */
	private String my_last_name;
	
	/** The address 1 */
	private String my_address1;
	
	/** The address 2 */
	@SuppressWarnings("unused")
	private String my_address2;
	
	/** The apartment number */
	@SuppressWarnings("unused")
	private String my_apt_num;
	
	/** The city */
	private String my_city;
	
	/** The state */
	private String my_state;
	
	/** The zip */
	private String my_zip;
	
	/** The phone */
	private String my_phone;
	
	/** The email */
	private String my_email;
	
	/** The employee number */
	private String my_employee_number;
	
	/** The bond number */
	private String my_bond_number;
	
	/** The AC controller */
	@SuppressWarnings("unused")
	private ACSystem my_ACcontroller;
	
	/** 
	 * Constructs the ACDirector pane
	 */
	public ACDirectorPane(final ACSystem the_ACcontroller) {
		setBorder(new LineBorder(new Color(0, 0, 0), 5));
		my_ACcontroller = the_ACcontroller;
		setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Auction Central Director Pane");
		lblNewLabel.setBounds(92, 16, 287, 20);
		add(lblNewLabel);
		
		//String uName="Biff Silverback";
		JLabel name = new JLabel(my_first_name + " " + my_last_name);
		name.setBackground(Color.BLACK);
		name.setForeground(Color.BLACK);
		name.setBounds(130, 82, 130, 20);
		add(name);
		
		
		JLabel name_label = new JLabel("Name:");
		name_label.setBounds(16, 82, 56, 20);
		add(name_label);
		
		JLabel address_label = new JLabel("Address:");
		address_label.setBounds(16, 112, 69, 20);
		add(address_label);
		
		JLabel address_label2 = new JLabel("Address:");
		address_label2.setBounds(16, 142, 69, 20);
		add(address_label2);
		
		JLabel phone_label = new JLabel("Phone:");
		phone_label.setBounds(16, 172, 69, 20);
		add(phone_label);
		
		//String uAddress="123 Eat me St.";
		JLabel address = new JLabel(my_address1);
		address.setBounds(130, 112, 295, 20);
		add(address);
		
		//String u2Address="Timbuktu, Somewhere 666999";
		JLabel address2 = new JLabel(my_city + ", " + my_state + " " + my_zip);
		address2.setBounds(130, 142, 338, 20);
		add(address2);
		
		//String uPhone="867-5309";
		JLabel phone = new JLabel(my_phone);
		phone.setBounds(130, 172, 69, 20);
		add(phone);
		
		JLabel email_label = new JLabel("Email:");
		email_label.setBounds(16, 202, 69, 20);
		add(email_label);
		
		//String uEmail="suckIt@yourMama.org";
		JLabel email = new JLabel(my_email);
		email.setBounds(130, 202, 197, 20);
		add(email);
		
		JLabel employee_no_label = new JLabel("Employee #:");
		employee_no_label.setBounds(16, 52, 99, 20);
		add(employee_no_label);
		
		//String uEmployee_num="ALL000";
		JLabel employee_num = new JLabel(my_employee_number);
		employee_num.setBounds(130, 52, 69, 20);
		add(employee_num);
		
		JLabel bondedLabel = new JLabel("Bond Number: ");
		bondedLabel.setBounds(16, 232, 109, 20);
		add(bondedLabel);
		
		//String uBondNum="Ac234zp";
		JLabel bond_num = new JLabel(my_bond_number);
		bond_num.setBounds(130, 232, 146, 26);
		add(bond_num);
	}
	
	/** 
	 * The getObjectData method 
	 */
	public void getObjectData(Object the_object){
		ACDirector my_ACDirector = (ACDirector)the_object;

		my_first_name = my_ACDirector.get_first_name();;
		my_last_name = my_ACDirector.get_last_name();
		my_address1 = my_ACDirector.getMy_address().getMy_address1();
		my_address2 = my_ACDirector.getMy_address().getMy_address2();
		my_apt_num = my_ACDirector.getMy_address().getMy_apt_num();
		my_city = my_ACDirector.getMy_address().getMy_city();
		my_state = my_ACDirector.getMy_address().getMy_state();
		my_zip = my_ACDirector.getMy_address().getMy_zip();
		my_phone = my_ACDirector.getMy_phone();
		my_email = my_ACDirector.getMy_email();
		my_bond_number = my_ACDirector.getBondNumber();
	}
}
